class CMyComClass : public IHelloWorld
{
public:
    CMyComClass();
    ~CMyComClass();

    // IUnknown
    STDMETHOD_(ULONG, AddRef)();
    STDMETHOD_(ULONG, Release)();
    STDMETHOD(QueryInterface)(REFIID riid, void** ppv);

    // IHelloWorld
    STDMETHOD(HelloWorld)(BSTR bsMessageText);

protected:
    ULONG RefCount;
};

class __declspec(uuid("{7D51904E-1645-4a8c-BDE0-0F4A44FC38C4}")) CMyComClass;